home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
ai
/
gaf200b
/
example
/
robotarm.ref
< prev
Wrap
Text File
|
1994-06-18
|
778b
|
50 lines
SEGMENT Reference
CYCLE_TIME 0.05
! Name MIN MAX
IN Position (0.0, 70.0)
OUT Pos_error(-70.0, 70.0)
OUT Reference(0.0, 70.0)
OUT Pos_reg (0, 1)
INITIALIZATION
Pos_error = 0;
Reference = 35;
Pos_reg = 1;
BEGIN
Pos_error = Reference - Position;
IF ( Pos_error > 0.5 ) OR ( Pos_error < -0.5 ) THEN
Pos_reg = 1;
ELSE
Pos_reg = 0;
ENDIF;
END;
PRESET ! 0
Reference = 70;
! Position = 0;
END;
PRESET ! 1
Reference = 35;
! Position = 40;
END;
PRESET ! 2
Reference = 35;
! Position = 0;
END;
PRESET ! 3
Reference = 35;
! Position = 70;
END;
PRESET ! 4
Reference = 35;
! Position = 25;
END;
END Reference;